//
//  WVMeasurer.m
//  Windows and Views
//
//  Created by Tim Isted on 06/10/2009.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "WVMeasurer.h"


@implementation WVMeasurer

- (IBAction)showMeasurements:(id)sender
{
    NSRect windowFrame = [applicationWindow frame];
    
    NSPoint windowLocation = windowFrame.origin;
    NSSize windowSize = windowFrame.size;
    
    [windowLocationTextField setStringValue:NSStringFromPoint(windowLocation)];
    [windowSizeTextField setStringValue:NSStringFromSize(windowSize)];
    
    NSRect viewFrame = [contentView frame];
    
    NSPoint viewLocation = viewFrame.origin;
    NSSize viewSize = viewFrame.size;
    
    [viewLocationTextField setStringValue:NSStringFromPoint(viewLocation)];
    [viewSizeTextField setStringValue:NSStringFromSize(viewSize)];
}

@end
